<?php
declare (strict_types = 1);
namespace app\school\model\school;

use app\common\model\BaseModel;

/**
 * 定义机构分成配置数据模型
 */
class SchoolSplitConfig extends BaseModel
{
    /**
     * 表名
     * @var string
     */
    protected $name = 'school_split_config';

    /**
     * 定义表主键
     * @var string
     */
    protected $pk = 'id';

    protected $type = [
        'value'         => 'serialize',
        'update_time'   => 'integer',
    ];

    /**
     * 机构条件
     * Author 亓官雨树<lucky.max@foxmail.com>
     * Date：   2020-08-27
     * @param  [type]                      $query [description]
     * @return [type]                             [description]
     */
    public function scopeStatus($query, $status = 1)
    {
        return $query->where('status', $status);
    }
}
